home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)G
/
(A)G6.ADF
/
terminator
< prev
next >
Wrap
Text File
|
1988-05-24
|
3KB
|
194 lines
equate flaga 9
equate ndist 8
equate ygoto 7
equate xgoto 6
equate count 5
equate scinc 4
equate scang 3
cpu 2x16bit
drive track 30
weapon crail 90 50
weapon laser 80 50
weapon crail 90 50
reg 10
# 0 sto 3
# 0 sto count
# 100 sto xgoto
# 50 posx x>y? goto abl1
# 0 sto xgoto
label abl1
# 100 sto ygoto
# 50 posy x>y? goto abl2
# 0 sto ygoto
label abl2
rcl ygoto # 50 - rcl xgoto # 50 - /
x<0? goto abl3
# 90 sto+ count
label abl3
rcl xgoto x=0? goto abl4
# 180 sto+ count
label abl4
rcl count
label top \ go to top left corner \
rcl ygoto posy - sto 1
rcl xgoto posx - sto 2
atan2 heading
rcl 1 enter *
rcl 2 enter *
+ sqrt
# 2 /
speed
# 3 x<y? goto top
# 0 speed \ stop at corner \
label begin
# 140 sto scinc
rcl count # 135 + sto scang
gosub nuke
# 2
rcl flaga x=y? goto donow
x!=0? goto begin
hit
# -4 sto scinc
rcl count sto scang
label scan \ scan around at corner for some commies \
hit x>0? goto runaway
# 2 rcl scang radar
x>0? goto fire
rcl scinc sto- scang
rcl scang rcl count # 90 - x>y? goto turn
rdn
rcl count x<y? goto turn
goto scan
label turn
# -1 sto* scinc
goto scan
label fire
sto 0
rcl scang rcl scinc # 2 / - aim
rcl 0
fire 0 fire 1 fire 2
goto scan
label runaway
# 180 rcl count + sto scang
# 90 sto scinc gosub nuke
# 2
rcl flaga x=y? goto donow
x!=0? goto runaway
label donow
# 90 sto+ count
rcl count # 350 x>y? goto jup1
# 360 sto- count
label jup1
label moveon
rcl count # 180 + heading
# 0
rcl count # 90 - sto scang
radar x>0? goto fire2
rcl count # 80 x<y? goto jup2
posx # 2 / speed
# 3 x<y? goto moveon
goto enough
label jup2
rdn # 170 x<y? goto jup3
posy # 2 / speed
# 3 x<y? goto moveon
goto enough
label jup3
rdn # 260 x<y? goto jup4
# 100 posx - # 2 / speed
# 3 x<y? goto moveon
goto enough
label jup4
# 100 posy - # 2 / speed
# 3 x<y? goto moveon
goto enough
label enough
# 0 speed
goto begin
label fire2
rcl scang aim
rdn
fire 0
goto moveon
label nuke \ flaga: 0: nothing there \
hit
# 0 sto flaga \ 1: found something \
\ 2: got hit while here \
label nucked
hit x=0? goto objk
# 2 sto flaga
return
label objk
rcl scinc \ recall the beam width \ \ start=pi/2 \
rcl scang \ recall the scan angle \ \ start=pi/2 \
radar \ anyone out there? \
x>0? \ found something \
sto ndist \ store distance \
x>0?
goto sam
rcl flaga x=0? return
rcl scinc
# 2 *
sto+ scang \ add it \
label sam \ found something \
# 1 sto flaga
# 2
sto/ scinc \ half the beam width \
rcl scinc
sto- scang \ take new width from scan angle \
# .3
x<y? \ if width is less than .3, start firing. \
goto nucked
# 2
rcl ndist / atan
rcl scang + aim
label fire3
hit
x!=0?
goto runaway
rcl ndist
fire 0
fire 1
fire 2
# .4 \ beam width is put in x \
rcl scang \ rcl pushes stack up, so beam width is now in y, and \
\ recalled number is in x \
radar \ is it still there ? \
x<0? goto begin \ not there \
goto fire3 \ otherwise keep firing \